package cc.comac.mom.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import cc.comac.mom.api.QualityQarBasicStandardService;
import cc.comac.mom.bean.QualityQarBasicStandard;
import cc.comac.mom.datahandlers.entity.QualityQarBasicStandardDataHanldler;
import cc.comac.mom.util.ResultBean;
@RestController
@Service

public class QualityQarBasicStandardServiceImpl implements QualityQarBasicStandardService{

	@Autowired
	private QualityQarBasicStandardDataHanldler qualityQarBasicStandardDataHanldler;	
	@Override
	public ResultBean insertQarBasicStandard(@RequestBody QualityQarBasicStandard qualityQarBasicStandard) {
		ResultBean insertQarBasicStandard = qualityQarBasicStandardDataHanldler.insertQarBasicStandard(qualityQarBasicStandard);
		return insertQarBasicStandard;
	}

	@Override
	public ResultBean selectByQarBasicStandardId(@RequestBody QualityQarBasicStandard qualityQarBasicStandard) {
		// TODO Auto-generated method stub
		return qualityQarBasicStandardDataHanldler.selectByQarBasicStandardId(qualityQarBasicStandard,true);
	}

	@Override
	public ResultBean batchDeleteByQarBasicStandardIds(@RequestBody List<QualityQarBasicStandard> list) {
		// TODO Auto-generated method stub
		return qualityQarBasicStandardDataHanldler.batchDeleteByQarBasicStandardIds(list);
	}

	@Override
	public ResultBean qarBasicStandardUpgrade(@RequestBody QualityQarBasicStandard qualityQarBasicStandard) {
		// TODO Auto-generated method stub
		return qualityQarBasicStandardDataHanldler.qarBasicStandardUpgrade(qualityQarBasicStandard);
	}

	@Override
	public ResultBean cancelQarBasicStandardUpgrade(@RequestBody QualityQarBasicStandard qualityQarBasicStandard) {
		// TODO Auto-generated method stub
		return qualityQarBasicStandardDataHanldler.cancelQarBasicStandardUpgrade(qualityQarBasicStandard);
	}

	@Override
	public ResultBean selectBySomeFields(@RequestBody QualityQarBasicStandard qualityQarBasicStandard) {
		// TODO Auto-generated method stub
		return qualityQarBasicStandardDataHanldler.selectBySomeFields(qualityQarBasicStandard);
	}

}
